<template>
  <teleport to="body">
    <transition name="fade">
      <vue-code v-if="value" @close="$emit('update:value', $event)"/>
    </transition>
  </teleport>
</template>

<script lang="ts" setup>
import VueCode from "@/components/VueCode.vue";

defineProps({
  value: Boolean
})

</script>

<style scoped lang="scss">
.fade-enter-from, .fade-leave-to {
  opacity: 0;
  transform: translateX(100%);
}

.fade-enter-active, .fade-leave-active {
  transition: all 1s;
}
</style>
